package org.come.setup;

import org.come.setup.XSeTupJpanelxsjm;
import org.come.setup.XSeTupJpanelzr;
import org.come.until.CutButtonImage;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;



public class XSeTupJpanelxz implements MouseListener {

    private XSeTupJpanelzr childCardJpanel;
    private int type;

    public XSeTupJpanelxz(int type, XSeTupJpanelzr childCardJpanel) {

        this.type = type;
        this.childCardJpanel = childCardJpanel;

    }

    @Override
    public void mouseClicked(MouseEvent e) {
        // TODO Auto-generated method stub

    }

    @Override
    public void mousePressed(MouseEvent e) {

        try {
        		if (type == 1) {
                    childCardJpanel.getCar().show(childCardJpanel, "l1");
                    XSeTupJpanelxsjm.getXSeTupJpanelxsjm().getXSeTupJpanel().getLabAttr()
                            .setIcons(CutButtonImage.cuts("skin/8100226/newbutton/K06.png"));
                    XSeTupJpanelxsjm.getXSeTupJpanelxsjm().getXSeTupJpanel().getLabTalent()
                            .setIcons(CutButtonImage.cuts("skin/8100226/newbutton/K07.png"));
//                    XSeTupJpanelxsjm.getXSeTupJpanelxsjm().getXSeTupJpanel().getLabTalent()
//                            .setIcons(CutButtonImage.cuts(imageMap.getImgMap().get("K09"),"K09"));
//                    XSeTupJpanelxsjm.getXSeTupJpanelxsjm().getXSeTupJpanel().getLabTalent()
//                            .setIcons(CutButtonImage.cuts(imageMap.getImgMap().get("K11"),"K11"));
                }
                if (type == 2) {
                    childCardJpanel.getCar().show(childCardJpanel, "l2");
                    XSeTupJpanelxsjm.getXSeTupJpanelxsjm().getXSeTupJpanel().getLabAttr()
                            .setIcons(CutButtonImage.cuts("skin/8100226/newbutton/K05.png"));
                    XSeTupJpanelxsjm.getXSeTupJpanelxsjm().getXSeTupJpanel().getLabTalent()
                            .setIcons(CutButtonImage.cuts("skin/8100226/newbutton/K08.png"));
//                    XSeTupJpanelxsjm.getXSeTupJpanelxsjm().getXSeTupJpanel().getLabTalent1()
//                            .setIcons(CutButtonImage.cuts(imageMap.getImgMap().get("K09"),"K09"));
//                    XSeTupJpanelxsjm.getXSeTupJpanelxsjm().getXSeTupJpanel().getLabTalent2()
//                            .setIcons(CutButtonImage.cuts(imageMap.getImgMap().get("K11"),"K11"));
                }
//            if (type == 3) {
//                childCardJpanel.getCar().show(childCardJpanel, "l3");
//                XSeTupJpanelxsjm.getXSeTupJpanelxsjm().getXSeTupJpanel().getLabAttr()
//                        .setIcons(CutButtonImage.cuts(imageMap.getImgMap().get("K05"),"K05"));
//                XSeTupJpanelxsjm.getXSeTupJpanelxsjm().getXSeTupJpanel().getLabTalent()
//                        .setIcons(CutButtonImage.cuts(imageMap.getImgMap().get("K07"),"K07"));
//                XSeTupJpanelxsjm.getXSeTupJpanelxsjm().getXSeTupJpanel().getLabTalent1()
//                        .setIcons(CutButtonImage.cuts(imageMap.getImgMap().get("K10"),"K10"));
//                XSeTupJpanelxsjm.getXSeTupJpanelxsjm().getXSeTupJpanel().getLabTalent2()
//                        .setIcons(CutButtonImage.cuts(imageMap.getImgMap().get("K11"),"K11"));
//            }
//
//            if (type == 4) {
//                childCardJpanel.getCar().show(childCardJpanel, "l4");
//                XSeTupJpanelxsjm.getXSeTupJpanelxsjm().getXSeTupJpanel().getLabAttr()
//                        .setIcons(CutButtonImage.cuts(imageMap.getImgMap().get("K05"),"K05"));
//                XSeTupJpanelxsjm.getXSeTupJpanelxsjm().getXSeTupJpanel().getLabTalent()
//                        .setIcons(CutButtonImage.cuts(imageMap.getImgMap().get("K07"),"K07"));
//                XSeTupJpanelxsjm.getXSeTupJpanelxsjm().getXSeTupJpanel().getLabTalent1()
//                        .setIcons(CutButtonImage.cuts(imageMap.getImgMap().get("K09"),"K09"));
//                XSeTupJpanelxsjm.getXSeTupJpanelxsjm().getXSeTupJpanel().getLabTalent2()
//                        .setIcons(CutButtonImage.cuts(imageMap.getImgMap().get("K12"),"K12"));
//            }






        } catch (Exception e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        }
    }

    @Override
    public void mouseReleased(MouseEvent e) {
        // TODO Auto-generated method stub

    }

    @Override
    public void mouseEntered(MouseEvent e) {
        // TODO Auto-generated method stub

    }

    @Override
    public void mouseExited(MouseEvent e) {
        // TODO Auto-generated method stub

    }

}
